#include "myactions.h"

//int CCMyRemvoe::m_iCCMyRemove = 0;

void CCMyRemvoe::update( float time )
{
	CC_UNUSED_PARAM(time);
	m_pTarget->removeFromParentAndCleanup(true);
}

CCFiniteTimeAction * CCMyRemvoe::reverse( void )
{
	// this action can't reverse
	CC_ASSERT(0);
	return NULL;
}

CCObject* CCMyRemvoe::copyWithZone( CCZone *pZone )
{
	CCZone *pNewZone = NULL;
	CCMyRemvoe *pRet = NULL;
	if (pZone && pZone->m_pCopyObject) {
		pRet = (CCMyRemvoe*) (pZone->m_pCopyObject);
	} else {
		pRet = new CCMyRemvoe();
		pZone = pNewZone = new CCZone(pRet);
	}

	CCActionInstant::copyWithZone(pZone);
	CC_SAFE_DELETE(pNewZone);
	return pRet;
}

CCMyRemvoe * CCMyRemvoe::create(bool bCleanup)
{
	CCMyRemvoe* pRet = new CCMyRemvoe();

	if (pRet) {
		pRet->autorelease();
		pRet->setCleanup(bCleanup);
	} else {
		CC_ASSERT(0);
	}

	return pRet;
}
